<template>
  <!--稿件直投-->
  <div>
    <carousel :autoplaySpeed="autoplaySpeed" :Img="Img"></carousel>
    <div class="wrapper">
      <Row :gutter="16">
        <i-col span="6">
          <ngn :data="data" :activeIndex="activeIndex"></ngn>
        </i-col>
        <i-col span="18">
          <div class="com">
            <p class="p">
              <Icon type="ios-pin"/>
              <span>您现在的位置是:</span><span class="span">{{data.title}}</span><span> > </span><span
              class="span">稿件直投</span>
            </p>
          </div>
          <div>
            <div class="manuscript" v-for="manuscript in manuscriptsd">
              <Row>
                <i-col span="18">
                  <p>稿件名称：{{manuscript.c_title}}</p>
                  <p>投稿期刊：{{manuscript.cname}}</p>
                  <p v-if="manuscript.state == 0">稿件状态：未处理</p>
                  <p v-if="manuscript.state == 1">稿件状态：已处理</p>
                  <p>投稿时间：{{manuscript.delivery_time}}</p>
                </i-col>
                <i-col span="6">
                  <div class="btn">
                    <router-link to="">
                      <Button type="primary" icon="ios-search">查看详情</Button>
                    </router-link>
                  </div>
                </i-col>
              </Row>
            </div>
          </div>
        </i-col>
      </Row>
    </div>
  </div>
</template>

<script>
  import carousel from '../module/carousel'
  import ngn from '../module/ngn'

  export default {
    components: {
      carousel, ngn
    },
    data() {
      return {
        activeIndex: 1,
        autoplaySpeed: 100000,
        workTrendLink: '',
        Img: [
          {
            id: 1,
            imageLocation: require('../../assets/img/u69.jpg'),
            state: true,
            uri: "",
          },
        ],
        data: {
          title: '个人中心',
          list: [
            {list: '个人信息', link: 'personalInformation',},
            {list: '稿件直投', link: 'ManuscriptDirectInvestment',},
            {list: '稿件评估', link: 'TheManuscriptEvaluation',},
            {list: '账号安全', link: 'accountSecurity',},
            {list: '投诉建议', link: 'complaintAndAdvice',},
          ],
        },
        id: '',
        url: this.$api.url,
        manuscriptsd: [],
      }
    },
    mounted() {
      this.id = localStorage.getItem('ms_userid');
      this.dataArray();
    },
    methods: {
      dataArray() {
        this.$axios.get(this.url + '/thesis/delivery/TDParticular/' + this.id).then((res) => {
          if (res.status == 200) {
            this.manuscriptsd = res.data
          }
        });
      },
    },
  }
</script>

<style scoped>
  .com .p {
    padding: 10px 0;
    font-size: 16px;
    font-weight: bold;
    border-bottom: 1px solid #000;
  }

  .span {
    padding: 0 10px;
  }

  .manuscript {
    background: rgba(242, 244, 251, 1);
    margin: 10px 0;
    border-radius: 5px;
    padding: 15px 20px;
    font-size: 16px;
  }

  .btn {
    padding-top: 50px;
  }
</style>
